package api

import (
	"bbs-go/internal/services"

	"github.com/kataras/iris/v12"
	"github.com/mlogclub/simple/web"
)

type UserDepartmentController struct {
	Ctx iris.Context
}

func (c *UserDepartmentController) GetList() *web.JsonResult {
	list, err := services.UserDepartmentService.FindDepartmentSimpleList()
	if err != nil {
		return web.JsonError(err)
	}
	return web.JsonData(list)
}
